<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label for="c-group_id" class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupList}
        </div>
    </div>

    <div class="form-group">
        <label for="c-group_type" class="control-label col-xs-12 col-sm-2">{:__('角色期限')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupTypeList}
        </div>
    </div>

    <div class="form-group" id="group_end_time" {if condition="$row.group_type == 2"} style="display: block;" {else /} style="display: none;" {/if}>
        <label for="c-group-end-time" class="control-label col-xs-12 col-sm-2">{:__('角色到期时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class='input-group datetimepicker' style="width: 60%">
                <input type='text' class="form-control" id="c-group-end-time" name="group_end_time" value="{$row.group_end_time|htmlentities}" disabled/>
                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="c-number" class="control-label col-xs-12 col-sm-2">{:__('学号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" name="row[number]" type="text" placeholder="{:__('Number')}" value="{$row.number|htmlentities}" data-rule="required" disabled>
        </div>
    </div>

    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[name]" type="text" placeholder="{:__('Name')}" value="{$row.name|htmlentities}" data-rule="required" disabled>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('床位')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="form-inline" data-toggle="cxselect" data-selects="garden,building,dorm,bed">
                <select class="form-control garden" name="garden_number"  data-url="common/gardens?school_id={$row.school_id}" >
                    <option value="{$row['bed']['garden_number']}" selected=""></option>
                </select>
                <select class="form-control building" name="building_number" data-url="common/buildingsByNumber?school_id={$row.school_id}&type={$row['gender']}" data-query-name="garden_number" >
                    <option value="{$row['bed']['building_number']}" selected=""></option>
                </select>
                <select class="form-control dorm" name="dorm_number" data-url="dormitory/dorm/cxSelect?school_id={$row.school_id}&type={$row['gender']}" data-query-name="building_number" >
                    <option value="{$row['bed']['dorm_number']}" selected=""></option>
                </select>
                <select class="form-control bed" name="bed_id" data-url="dormitory/bed/cxSelect?school_id={$row.school_id}&status={$row['is_bed'] ? 'all' : '1'}&type={$row['gender']}" data-query-name="dorm_number" >
                    <option value="{$row['bed']['id']}" selected=""></option>
                </select>
            </div>

        </div>
    </div>


</form>
